[EuiAccordion] Migrate from class to function component#9558
[EuiAccordion] Migrate from class to function component#9558antonbc wants to merge 5 commits intoelastic:mainfrom
Conversation
|
💚 CLA has been signed |
|
👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually? |
|
👋 Since this is a community submitted pull request, a Buildkite build has not been started automatically. Would an Elastic organization member please verify the contents of this pull request and kick off a build manually? |
There was a problem hiding this comment.
Pull request overview
Migrates EuiAccordion from a class component wrapped in withEuiTheme to a function component that uses hooks (useEuiTheme, useGeneratedHtmlId) while aiming to keep behavior and public API the same.
Changes:
- Replaced class state/handlers with
useStateand an internal toggle handler. - Replaced
withEuiTheme+WithEuiThemePropsusage withuseEuiTheme. - Replaced
htmlIdGenerator()instance property withuseGeneratedHtmlId().
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
087711b to
bbad3a9
Compare
|
Hi, I have removed the unnecessary changelog and addressed all the comments. Please let me know if anything else needs attention! |
weronikaolejniczak
left a comment
There was a problem hiding this comment.
Everything LGTM! Thank you for addressing my comments and for contributing, @antonbc 🙏🏻
The next EUI release scope is closed so we won't be able to merge the PR this week.
💚 Build SucceededHistory
|
💚 Build Succeeded
History
|
Summary
EuiAccordionfrom a class component to a function component.useStateforisOpenwithEuiThemeHOC withuseEuiThemehookAPI Changes
No API changes.
Screenshots
No visual changes
Impact Assessment
Note: Most PRs should be tested in Kibana to help gauge their Impact before merging.
🔴 Breaking changes💅 Visual changes🔧 Hard to integrateImpact level: 🟢 None / 🟢 Low / 🟡 Moderate / 🔴 High
Release Readiness
Documentation:Figma:Migration guide:Adoption planQA instructions for reviewer
Checklist before marking Ready for Review
breaking changelabel (if applicable)Reviewer checklist
useStatewithEuiThemeHOC withuseEuiThemehook if applicable